Avoid unaligned access. (#172947)
authorMatthias Clasen <mclasen@redhat.com>
Thu, 7 Apr 2005 19:10:11 +0000 (19:10 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 7 Apr 2005 19:10:11 +0000 (19:10 +0000)
2005-04-07  Matthias Clasen  <mclasen@redhat.com>

* gtk/updateiconcache.c (write_card16, write_card32): Avoid
unaligned access.  (#172947)

* gtk/gtkfilechooserdefault.c (file_list_build_popup_menu):
Consistently use the term "Bookmarks" in the UI.  (#166906,
Sebastian Bacher)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkfilechooserdefault.c
gtk/updateiconcache.c

index 77d725f8d5b138ab4ce4c5777bc4bb0d315d56bc..07d0042030291635e1725b5ff040b5359f42c86d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2005-04-07  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/updateiconcache.c (write_card16, write_card32): Avoid
+       unaligned access.  (#172947)
+
+       * gtk/gtkfilechooserdefault.c (file_list_build_popup_menu): 
+       Consistently use the term "Bookmarks" in the UI.  (#166906,
+       Sebastian Bacher)
+
        Some fixes from Morten Welinder (#172947):
        
        * gtk/updateiconcache.c (icon_name_hash): Make this compiler- 
index 77d725f8d5b138ab4ce4c5777bc4bb0d315d56bc..07d0042030291635e1725b5ff040b5359f42c86d 100644 (file)
@@ -1,5 +1,12 @@
 2005-04-07  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/updateiconcache.c (write_card16, write_card32): Avoid
+       unaligned access.  (#172947)
+
+       * gtk/gtkfilechooserdefault.c (file_list_build_popup_menu): 
+       Consistently use the term "Bookmarks" in the UI.  (#166906,
+       Sebastian Bacher)
+
        Some fixes from Morten Welinder (#172947):
        
        * gtk/updateiconcache.c (icon_name_hash): Make this compiler- 
index 77d725f8d5b138ab4ce4c5777bc4bb0d315d56bc..07d0042030291635e1725b5ff040b5359f42c86d 100644 (file)
@@ -1,5 +1,12 @@
 2005-04-07  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/updateiconcache.c (write_card16, write_card32): Avoid
+       unaligned access.  (#172947)
+
+       * gtk/gtkfilechooserdefault.c (file_list_build_popup_menu): 
+       Consistently use the term "Bookmarks" in the UI.  (#166906,
+       Sebastian Bacher)
+
        Some fixes from Morten Welinder (#172947):
        
        * gtk/updateiconcache.c (icon_name_hash): Make this compiler- 
index 9ff07dece6d6b77331dad2ea0c40d4beb21466bf..174b3c9f5e5e237e4b73623e56b16a47f57335d2 100644 (file)
@@ -3184,7 +3184,7 @@ shortcuts_pane_create (GtkFileChooserDefault *impl,
                                                  G_CALLBACK (add_bookmark_button_clicked_cb));
   gtk_box_pack_start (GTK_BOX (hbox), impl->browse_shortcuts_add_button, TRUE, TRUE, 0);
   gtk_tooltips_set_tip (impl->tooltips, impl->browse_shortcuts_add_button,
-                        _("Add the selected folder to the bookmarks"), NULL);
+                        _("Add the selected folder to the Bookmarks"), NULL);
 
   /* Remove bookmark button */
 
@@ -3259,7 +3259,7 @@ popup_menu_detach_cb (GtkWidget *attach_widget,
   impl->browse_files_popup_menu_hidden_files_item = NULL;
 }
 
-/* Callback used when the "Add to Shortcuts" menu item is activated */
+/* Callback used when the "Add to Bookmarks" menu item is activated */
 static void
 add_to_shortcuts_cb (GtkMenuItem           *item,
                     GtkFileChooserDefault *impl)
@@ -3299,7 +3299,7 @@ file_list_build_popup_menu (GtkFileChooserDefault *impl)
                             impl->browse_files_tree_view,
                             popup_menu_detach_cb);
 
-  item = gtk_image_menu_item_new_with_mnemonic (_("_Add to Shortcuts"));
+  item = gtk_image_menu_item_new_with_mnemonic (_("_Add to Bookmarks"));
   impl->browse_files_popup_menu_add_shortcut_item = item;
   gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item),
                                 gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_MENU));
@@ -3335,7 +3335,7 @@ file_list_update_popup_menu (GtkFileChooserDefault *impl)
 {
   file_list_build_popup_menu (impl);
 
-  /* The sensitivity of the Add to Shortcuts item is set in
+  /* The sensitivity of the Add to Bookmarks item is set in
    * bookmarks_check_add_sensitivity()
    */
 
index d7e8867b52d4c51e6de61b7db4403e5d40a0c984..8662166659ed56641a25f8e051779435f9ebd69b 100644 (file)
@@ -443,11 +443,10 @@ gboolean
 write_card16 (FILE *cache, guint16 n)
 {
   int i;
-  gchar s[2];
 
-  *((guint16 *)s) = GUINT16_TO_BE (n);
+  n = GUINT16_TO_BE (n);
   
-  i = fwrite (s, 2, 1, cache);
+  i = fwrite ((char *)&n, 2, 1, cache);
 
   return i == 1;
 }
@@ -456,11 +455,10 @@ gboolean
 write_card32 (FILE *cache, guint32 n)
 {
   int i;
-  gchar s[4];
 
-  *((guint32 *)s) = GUINT32_TO_BE (n);
+  n = GUINT32_TO_BE (n);
   
-  i = fwrite (s, 4, 1, cache);
+  i = fwrite ((char *)&n, 4, 1, cache);
 
   return i == 1;
 }